{% extends 'blog/base.html' %}

{% block content %}
<div>
  

  {% if messages %}
  <ul>
    {% for message in messages %}
        <li>{{ message }}</li>
    {% endfor %}
  </ul>
  {% endif %}

 
</div>

<div>
  {% for post in object_list %}
    <p>
      Title: <a href="{% url 'blog:detail' post.pk %}">{{ post.title }}</a>
      <br>
      Body: {{ post.body }}
      <br>
      Slug: {{ post.slug }}
    </p>
    <hr>
  {% empty %}
    No posts yet!
  {% endfor %}
</div>

{% endblock %}
